Skip to content

build: adjust Dockerfile to new Cargo build-dir layout - #117

Merged
intgr merged 1 commit into
mainfrom
adjust-dockerfile-cargo-build-dir
Aug 5, 2026
Merged

build: adjust Dockerfile to new Cargo build-dir layout#117
intgr merged 1 commit into
mainfrom
adjust-dockerfile-cargo-build-dir

Conversation

@intgr

@intgr intgr commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Cargo layout change: rust-lang/cargo#15010 (now enabled in nightly)

Determined that rm is still needed: Cargo rebuilds a crate only if a source file's mtime is newer than the previous build's start time.

Docker COPY preserves the real src/lib.rs mtime, which would be older than the dummy build's start — so Cargo wrongly deems the crate fresh and skips rebuild.

Cargo layout change: rust-lang/cargo#15010 (now enabled in nightly)

Determined that `rm` is still needed: Cargo rebuilds a crate only if a source file's mtime is newer than the previous build's start time.

Docker `COPY` preserves the real `src/lib.rs` mtime, which would be older than the dummy build's start — so Cargo wrongly deems the crate fresh and skips rebuild.
@intgr intgr changed the title build: Adjust Dockerfile to new Cargo build-dir layout build: adjust Dockerfile to new Cargo build-dir layout Aug 5, 2026
@intgr
intgr merged commit d4c7137 into main Aug 5, 2026
1 check passed
@intgr
intgr deleted the adjust-dockerfile-cargo-build-dir branch August 5, 2026 18:37
@github-actions github-actions Bot mentioned this pull request Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant